package common_package

import (
	rand2 "crypto/rand"
	"fmt"
	"math/big"
	"math/rand"
	"time"
)

func RandomArray() {

	rand.Seed(time.Now().UnixNano())
	a := rand.Intn(100) //实际随机生成的数字范围[0,99]
	fmt.Printf("a的类型为[%T],a的随机数值为:[%d]\n", a, a)

	b, _ := rand2.Int(rand2.Reader, big.NewInt(100))
	fmt.Printf("b的类型为[%T],b的随机数值为:[%d]\n", b, b)
	c := b.Int64()
	fmt.Printf("c的类型为[%T],c的随机数值为:[%d]\n", c, c)

}
